
const {ccclass, property} = cc._decorator;
import Vlist from "./VirtualList";

@ccclass
export default class Helloworld extends cc.Component {

    @property(cc.Node)
    vlist: cc.Node = null;

    @property
    text: string = 'hello';


    onLoad(){
    }
    start () {
        // init logic
        let arr = [];
        for(let i = 0; i<600000;i++){
            let time = i;
            arr.push(time);
        }
        let a = this.vlist.getComponent(Vlist);
        let b = this.vlist.getComponent('VirtualList');
        a.initVList(arr);
    } 
    updateItem(info,node:cc.Node){
        node.active = true;
        node.getChildByName('lab').getComponent(cc.Label).string = info;
    }
}
